<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Collaborative Connected Learning Space</title>

   <link rel="stylesheet" type="text/css" href="lib/ext-js/resources/css/ext-all.css" />
    <link rel="stylesheet" type="text/css" href="css/desktop.css" />
	<link rel="stylesheet" type="text/css" href="css/data-view.css" />
	<link rel="stylesheet" type="text/css" href="css/browser.css" />
	<!-- link href="css/rating.css" rel="stylesheet" />

    <!-- GC -->
 	<!-- LIBS -->
 	<script type="text/javascript" src="lib/ext-js/adapter/ext/ext-base.js"></script>
 	<script type="text/javascript" src="lib/ext-js/ext-all-debug.js"></script> 
    <!--<script type="text/javascript" src="lib/ext-js/ext-all.js"></script>-->
 	<!-- ENDLIBS -->
	
	
	<!-- config file -->
    <script type="text/javascript" src="js/config.js"></script>
    
    <!-- DESKTOP -->
    <script type="text/javascript" src="js/User.js"></script>
    <script type="text/javascript" src="js/miframe.js"></script>
    <script type="text/javascript" src="js/StartMenu.js"></script>
    <script type="text/javascript" src="js/TaskBar.js"></script>
    <script type="text/javascript" src="js/Desktop.js"></script>
    <script type="text/javascript" src="js/DesktopCreator.js"></script>
    <script type="text/javascript" src="js/App.js"></script>
    <script type="text/javascript" src="js/Module.js"></script>
    <script type="text/javascript" src="js/Slide.js"></script>
    <!-- <script type="text/javascript" src="sample2.js"></script> -->
    <script type="text/javascript" src="js/ccls.js"></script>
    <script type="text/javascript" src="js/VideoWindow.js"></script>
    <script type="text/javascript" src="js/ChatWindow.js"></script>
    <script type="text/javascript" src="js/BrowserWindow.js"></script>
    <script type="text/javascript" src="js/SlideWindow.js"></script>
    <script type="text/javascript" src="js/SlidesThumbsWindow.js"></script>
    <script type="text/javascript" src="js/ReferenceManager.js"></script>
    <script type="text/javascript" src="js/QueuedReferenceWindow.js"></script>
    <script type="text/javascript" src="js/ReferenceWindow.js"></script>
    <script type="text/javascript" src="js/BookmarkletWindow.js"></script>
    <script type="text/javascript" src="js/ShareRequestWindow.js"></script>
    <script type="text/javascript" src="js/ShareReferenceWindow.js"></script>
    <script type="text/javascript" src="js/AddSemanticRelationWindow.js"></script>
    <script type="text/javascript" src="js/NotesViewerWindow.js"></script>
    <script type="text/javascript" src="js/AddNoteWindow.js"></script>
    <script type="text/javascript" src="js/TagManager.js"></script>
    <script type="text/javascript" src="js/protovis-r3.2.js"></script>
    <script type="text/javascript" src="js/GraphWindow.js"></script>
    <script type="text/javascript" src="js/Graph.js"></script>
 	<script type="text/javascript" src="js/start.js"></script>

   

        
    
     <script type="text/javascript">
     
  
  //Check the authentication
  //returns user data
  Ext.Ajax.request({
			url: 'openid',
			method: "GET",
			success: function(resp) {
				var result = Ext.decode(resp.responseText);
				if (result.login){
					//Ext.get("x-desktop").applyStyles({visibility:'hidden'});
//					Ext.get("ux-taskbar").applyStyles({visibility:'hidden'});
					Ext.Msg.show({
						   title: 'OpenId Login',
						   msg: 'Please choose your OpenId provider to login: <br>'
						   + '<center> <a href="openid?op=Google"><img border="0" src="images/google.jpg"></a>&nbsp;&nbsp;<a href="openid?op=Yahoo"><img border="0" src="images/yahoo.jpg"></a> </center>',
						   width: 600,
						   icon: Ext.MessageBox.INFO
						});
					//window.location = result.redirect;
				}
				else{
					Ext.get("lectures-overview").applyStyles({visibility:'visible'});
					Ext.get("x-desktop").applyStyles({visibility:'visible'});
					Ext.get("ux-taskbar").applyStyles({visibility:'visible'});
					alert("Hello " + result.firstName + " " + result.lastName);
				}
				
			},
			 failure: function (resp) {
			
             }
		}); 


  </script>
</head>
<body scroll="no">

<div style="visibility: hidden;" id="x-desktop">
    <a href="http://tk.informatik.tu-darmstadt.de" target="_blank" style="margin:5px; float:right;"><img src="images/tud_logo.png" /></a>

<!--
    <dl id="x-shortcuts">
        <dt id="grid-win-shortcut">
            <a href="#"><img src="images/s.gif" />
            <div>Grid Window</div></a>
        </dt>
        <dt id="acc-win-shortcut">
            <a href="#"><img src="images/s.gif" />
            <div>Accordion Window</div></a>
        </dt>
    </dl>
-->

	<div style="visibility: hidden;" id="lectures-overview"></div>
</div>


<div style="visibility: hidden;" id="ux-taskbar">
	<div id="ux-taskbar-start"></div>
	<div id="ux-taskbuttons-panel"></div>
	<div class="x-clear"></div>
</div>


</body>
</html>
